package com.javasm.domin.entity.orderEntity;

import com.javasm.domin.entity.base.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @TableName b2c_receiver
 */
@Data
public class B2cReceiver extends BaseEntity {

    /**
     * 收货人名称
     */
    private String receiverName;
    /**
     * 订单ID
     *
     */
    private Long orderId;

    /**
     *
     */
    private String postalCode;

    /**
     * 收货人地址
     */
    private String receiverAdress;

    /**
     * 收货人电子邮箱
     */
    private String receiverEmail;

    /**
     * 收货人座机号
     */
    private String receiverTelephone;

    /**
     * 手机号码
     */
    private String receiverPhone;

    /**
     * 自提时间
     */
    private Date selfMentiontime;

    /**
     * 备注
     */
    private String receiverNotation;
    /**
     * 会员号
     */
    private String vipId;

    /**
     * 汇款人姓名
     */
    private String payName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        B2cReceiver other = (B2cReceiver) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getReceiverName() == null ? other.getReceiverName() == null : this.getReceiverName().equals(other.getReceiverName()))
                && (this.getPostalCode() == null ? other.getPostalCode() == null : this.getPostalCode().equals(other.getPostalCode()))
                && (this.getReceiverAdress() == null ? other.getReceiverAdress() == null : this.getReceiverAdress().equals(other.getReceiverAdress()))
                && (this.getReceiverEmail() == null ? other.getReceiverEmail() == null : this.getReceiverEmail().equals(other.getReceiverEmail()))
                && (this.getReceiverTelephone() == null ? other.getReceiverTelephone() == null : this.getReceiverTelephone().equals(other.getReceiverTelephone()))
                && (this.getReceiverPhone() == null ? other.getReceiverPhone() == null : this.getReceiverPhone().equals(other.getReceiverPhone()))
                && (this.getSelfMentiontime() == null ? other.getSelfMentiontime() == null : this.getSelfMentiontime().equals(other.getSelfMentiontime()))
                && (this.getReceiverNotation() == null ? other.getReceiverNotation() == null : this.getReceiverNotation().equals(other.getReceiverNotation()))
                && (this.getPayName() == null ? other.getPayName() == null : this.getPayName().equals(other.getPayName()))
                && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getReceiverName() == null) ? 0 : getReceiverName().hashCode());
        result = prime * result + ((getPostalCode() == null) ? 0 : getPostalCode().hashCode());
        result = prime * result + ((getReceiverAdress() == null) ? 0 : getReceiverAdress().hashCode());
        result = prime * result + ((getReceiverEmail() == null) ? 0 : getReceiverEmail().hashCode());
        result = prime * result + ((getReceiverTelephone() == null) ? 0 : getReceiverTelephone().hashCode());
        result = prime * result + ((getReceiverPhone() == null) ? 0 : getReceiverPhone().hashCode());
        result = prime * result + ((getSelfMentiontime() == null) ? 0 : getSelfMentiontime().hashCode());
        result = prime * result + ((getReceiverNotation() == null) ? 0 : getReceiverNotation().hashCode());
        result = prime * result + ((getPayName() == null) ? 0 : getPayName().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderId=").append(orderId);
        sb.append(", receiverName=").append(receiverName);
        sb.append(", postalCode=").append(postalCode);
        sb.append(", receiverAdress=").append(receiverAdress);
        sb.append(", receiverEmail=").append(receiverEmail);
        sb.append(", receiverTelephone=").append(receiverTelephone);
        sb.append(", receiverPhone=").append(receiverPhone);
        sb.append(", selfMentiontime=").append(selfMentiontime);
        sb.append(", receiverNotation=").append(receiverNotation);
        sb.append(", payName=").append(payName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}